home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / tests / tfix.exp < prev    next >
Text File  |  1992-05-06  |  2KB  |  71 lines

  1. Fix: identities should be displayed
  2. [X] displays the precision of a given value
  3. [*] indicates that the full precision is not used for coding reasons
  4. 0 [16] =  0.00000 [16]
  5. .5 [16] =  0.50000 [16]
  6. -.5 [17] = -0.50000 [17]
  7. .1 [33] =  0.10000 [33]
  8. -.5 [17] = -0.50000 [17]
  9. .3 [16] =  0.29999 [16]
  10. .5 [16] =  0.50000 [16]
  11. .1 [16] =  0.09998 [16]
  12. .1 [33*] =  0.09998 [33]
  13. -.2 [17] = -0.20001 [17]
  14. -.5 [17] = -0.50000 [17]
  15. .1 [16] == .1 [33*] = 1
  16. .1 [16] == .1 [33] = 0
  17. .1 [33] != .5 [16] = 1
  18. .1 [33] > .5 [16] = 0
  19. .1 [33] <= -.2 [17] = 0
  20. 1073741824 = 1.07374e+09
  21. .5 = 0.5
  22. .5 [17] =  0.50000 [17]
  23. -.5 [17] = -0.50000 [17]
  24. .1 [33] + .5 [16] =  0.60000 [33]
  25. .1 [33] - .5 [16] = -0.40000 [33]
  26. .1 [33] * .5 [16] =  0.05000 [49]
  27. .1 [33] *  3 =  0.30000 [33]
  28. .1 [33] * -3 = -0.30000 [33]
  29. -.1 [33] *  3 = -0.30000 [33]
  30. -.1 [33] * -3 =  0.30000 [33]
  31. .5 [17] * -2 = -1.00000 [17]
  32. .1 [33] % 25 =  0.10000 [58]
  33. .1 [33] % -25 =  0.09375 [8]
  34. .1 [33] / .5 [16] =  0.20001 [33]
  35. .1 [33] << 1 =  0.20000 [33]
  36. -.1 [33] >> 2 =  0.47500 [33]
  37. abs(-.2) =  0.20001 [17]
  38. abs(.2) =  0.20001 [17]
  39. sgn(-.2) = -1
  40. sgn(.2) = 1
  41.  
  42. show .1 [33]
  43. len = 33
  44. siz = 3
  45. ref = 1
  46. man =  ccccccc8000
  47. val = 0.1
  48.  
  49. Fix: range errors warned
  50. Fix: range error in declaration
  51. 1.1 [16] =  0.00000 [16]
  52. Fix: range error in division
  53. .5 [16] / .1 [33] =  0.00000 [16]
  54. Fix: range error in division -- division by zero
  55. .5 [16] / 0. [16] =  0.00000 [16]
  56. Fix: range error in multiply by int -- int too large
  57. .5 [17] * 32768 = -1.00000 [17]
  58.  
  59. Fix: overflows saturated
  60. .95 [16] + .1 [33] =  1.00000 [33]
  61. -.1 [33] - .95 [16] = -1.00000 [33]
  62. .5 [17] * 2 =  0.99998 [17]
  63.  
  64. Fix: overflows generate warnings
  65. Fix: overflow warning
  66. .95 [16] + .1 [33] = -0.94999 [33]
  67. Fix: overflow warning
  68. -.1 [33] - .95 [16] =  0.94999 [33]
  69. Fix: overflow warning
  70. .5 [17] * 2 = -0.49994 [17]
  71.